Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
protobuf-schema
Advanced tools
No nonsense protobuf schema parser written in Javascript
npm install protobuf-schema
First save the following file as example.proto
message Point {
required int32 x = 1;
required int32 y=2;
optional string label = 3;
}
message Line {
required Point start = 1;
required Point end = 2;
optional string label = 3;
}
The run the following example
var fs = require('fs')
var schema = require('protobuf-schema')
// pass a buffer or string to schema.parse
var sch = schema.parse(fs.readFileSync('example.proto'))
// will print out the schema as a javascript object
console.log(sch)
Running the above example will print something like
{
package: null,
enums: [],
messages: [{
name: 'Point',
enums: [],
messages: [],
fields: [{
name: 'x',
type: 'int32',
tag: 1,
required: true,
repeated: false,
options: {}
}, {
name: 'y',
type: 'int32',
tag: 2,
required: true,
repeated: false,
options: {}
}, {
name: 'label',
type: 'string',
tag: 3,
required: false,
repeated: false,
options: {}
}]
}, {
name: 'Line',
enums: [],
messages: [],
fields: [{
name: 'start',
type: 'Point',
tag: 1,
required: true,
repeated: false,
options: {}
}, {
name: 'end',
type: 'Point',
tag: 2,
required: true,
repeated: false,
options: {}
}, {
name: 'label',
type: 'string',
tag: 3,
required: false,
repeated: false,
options: {}
}]
}],
options:{}
}
schema.parse(protobufSchemaBufferOrString)
Parses a .proto schema into a javascript object
schema.stringify(schema)
Stringifies a parsed schema back into .proto format
MIT
FAQs
No nonsense protobuf schema parser written in Javascript
The npm package protobuf-schema receives a total of 745 weekly downloads. As such, protobuf-schema popularity was classified as not popular.
We found that protobuf-schema demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.